//
//  PKRequestManager.h
//  PianKe
//
//  Created by lanou on 15/9/26.
//  Copyright (c) 2015年 徐永祥. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger, RequestType) {
    
    POST,
    GET,
};
//创建网络请求Block
typedef void(^RequestFinish)(NSData *data);
typedef void(^RequestError)(NSError *error);



@interface PKRequestManager : NSObject
//外界调用方法，传递过来我们请求的参数，同时把请求完成后处理的函数也传给这个类，方便这个类请求之后把响应的结果通过Block传回给外界
//-(void)requestWithType:(RequestType)type urlString:(NSString *)urlStr parDic:(NSDictionary *)parDic finish:(RequestFinish )finish error:(RequestError)error;
+(void)requestWithType:(RequestType)type urlString:(NSString *)urlStr parDic:(NSDictionary *)parDic finish:(RequestFinish )finish error:(RequestError)error;

@end
